import request from '@/utils/request'
/**
 * 查询企业的部门列表
 * @returns
 */
export const reqGetDepartments = () => request.get('/company/department')
/**
 * 根据id删除部门
 * @param {*} id 部门id
 * @returns
 */
export const reqDelDepartments = (id) => request.delete(`/company/department/${id}`)
/**
 * 新增部门接口
 * @param {*} data
 * @returns
 */
export const reqAddDepartments = (data) => request.post('/company/department', data)
/**
 * 获取部门详情
 * @param {*} id 部门id
 * @returns
 */
export const reqGetDepartDetail = (id) => request.get(`/company/department/${id}`)
/**
 * 修改部门
 * @param {*} data
 * @returns
 */
export const reqUpdateDepartments = (data) => request.put(`/company/department/${data.id}`, data)
